#include "updateprofilerequest.h"
#include "updateprofileresponse.h"
#include <json.h>

#include <QDebug>
#include <QUrl>
#include <QTextStream>
#include <QVariant>


namespace Profile {

UpdateProfileRequest::UpdateProfileRequest(const QString &sessionKey):
    m_sessionKey(sessionKey),
    m_response(new UpdateProfileResponse())
{
}


Network::JSONResponse &UpdateProfileRequest::jsonResponse()
{
    return *m_response;
}


const Network::JSONResponse &UpdateProfileRequest::jsonResponse() const
{
    return *m_response;
}


QUrl UpdateProfileRequest::url() const
{
    QString url = QString("http://mapi2.me.zing.vn/frs/mapi2/user?method=user.updateprofile&email=%1&gender=%2&dob=%3&displayname=%4&session_key=%5")
            .arg(m_email).arg(igender).arg(m_birthday).arg(m_fullName).arg(m_sessionKey);
    return QUrl(url);
}

} // namespace Profile
